<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no"
    />
    <title>15-解构.html</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
    </style>
  </head>
  <body>
    <script>
      // const obj = {
      //   name: '八戒',
      //   height: 100,
      // };

      // // const name=obj.name;

      // // 解构
      // const { name } = obj;
      // console.log(name);

      const name = "八戒";
      const height = 160;

      // const obj={name,height};
      const obj = { name: name, height: height };
    </script>
  </body>
</html>
